<?php

namespace app\http\middleware;

use app\common\model\ViewHistory;
/**
 * 用户的访问记录进行记录分析
 *
 * @author LCY <409028735@qq.com>
 */
class UserView
{
    public function handle($request, \Closure $next)
    {
        if ($request->isGet() && !$request->isAjax()) {
            //ViewHistory::saveViewHistory($request->ip(), $request->url(), $request->header('user-agent'), $request->isMobile() ? 1 : 0);
        }

        return $next($request);
    }
}
